import layoutHeaderAside from '@/layout'

const meta = {
    auth: true
}

export default {
    path: "/management",
    name: "management",
    meta,
    redirect: {
        name: "management-role"
    },
    component: layoutHeaderAside,
    children: (pre => [
        // {
        //     path: 'index',
        //     name: `${pre}index`,
        //     component: () => import('@/views/knowledge'),
        //     redirect: {
        //         name: 'home'
        //     },
        //     meta: {
        //         ...meta,
        //         title: "首页",
        //         img: require('@/assets/pollution/首页.png'),
        //         isMenu: true
        //     }
        // },
        {
            path: 'systemManage',
            name: `${pre}systemManage`,
            component: { render(c) { return c('router-view') } },

            meta: {
                ...meta,
                title: "系统管理",
                img: require('@/assets/pollution/首页.png'),
                isMenu: true
            },
            children:[
                {
                    path: "role",
                    name: `${pre}role`,
                    component: () => import("@/views/management/Role"),
                    meta: {
                        ...meta,
                        title: "角色配置管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "operation",
                    name: `${pre}operation`,
                    component: () => import("@/views/management/operationSet"),
                    meta: {
                        ...meta,
                        title: "组织机构管理",
                        img: require('@/assets/public/组织机构管理.png'),
                        isMenu: true
                    }
                },
                {
                    path:'information',
                    name:`${pre}information`,
                    component:()=>import("@/views/management/Enterprise"),
                    meta:{
                        ...meta,
                        title:"企业信息维护",
                        isMenu:true,
                        img: require('@/assets/public/石化企业运维.png'),
                    }
                },
                {
                    path: "materialpurchase",
                    name: `${pre}materialpurchase`,
                    component: () => import("@/views/management/MaterialPurchase"),
                    meta: {
                        ...meta,
                        title: "采购物资管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "exception",
                    name: `${pre}exception`,
                    component: () => import("@/views/management/Exception"),
                    meta: {
                        ...meta,
                        title: "监测因子管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "dictionary",
                    name: `${pre}dictionary`,
                    component: () => import("@/views/management/dictionary"),
                    meta: {
                        ...meta,
                        title: "字典配置管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "outliers",
                    name: `${pre}outliers`,
                    component: () => import("@/views/management/Outliers"),
                    meta: {
                        ...meta,
                        title: "报警限值管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "technological",
                    name: `${pre}technological`,
                    component: () => import("@/views/management/Technological"),
                    meta: {
                        ...meta,
                        title: "流程控制管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "equipmentType",
                    name: `${pre}equipmentType`,
                    component: () => import("@/views/management/EquipmentType"),
                    meta: {
                        ...meta,
                        title: "设备类型管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                // {
                //     path: "user",
                //     name: `${pre}user`,
                //     component: () => import("@/views/management/User"),
                //     meta: {
                //         ...meta,
                //         title: "运维人员管理",
                //         img: require('@/assets/public/运维人员管理.png'),
                //         isMenu: true
                //     }
                // },
                // {
                //     path: "department",
                //     name: `${pre}department`,
                //     component: () => import("@/views/management/department"),
                //     meta: {
                //         ...meta,
                //         title: "运维部门管理",
                //         img: require('@/assets/pollution/历史数据.png'),
                //         isMenu: true
                //     }
                // },


                {
                    path: "branch",
                    name: `${pre}branch`,
                    component: () => import("@/views/management/Branch"),
                    meta: {
                        ...meta,
                        title: "部门信息管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
                {
                    path: "menuList",
                    name: `${pre}menuList`,
                    component: () => import("@/views/management/menuList"),
                    meta: {
                        ...meta,
                        title: "菜单配置管理",
                        img: require('@/assets/pollution/历史数据.png'),
                        isMenu: true
                    }
                },
            ]
        },

        // {
        //     path: "monitoringStation",
        //     name: `${pre}monitoringStation`,
        //     component: { render(c) { return c('router-view') } },
        //     meta:{
        //         ...meta,
        //         title:"监测站点管理",
        //         img: require('@/assets/pollution/历史数据.png'),
        //         isMenu: true
        //     },
        //     children:[
        //         {
        //             path:"waste",
        //             name:`${pre}waste`,
        //             component:()=>import("@/views/pollution/equipmentInfo"),
        //             meta:{
        //                 ...meta,
        //                 title:"污染源监测平台",
        //                 isMenu:true
        //             }
        //         },
        //         {
        //             path:"water",
        //             name:`${pre}water`,
        //             component:()=>import("@/views/water/equipmentInfo"),
        //             meta:{
        //                 ...meta,
        //                 title:"水站监测平台",
        //                 isMenu:true
        //             }
        //         },
        //         {
        //             path:"air",
        //             name:`${pre}air`,
        //             component:()=>import("@/views/air/Deviceinfo.vue"),
        //             meta:{
        //                 ...meta,
        //                 title:"空气站监测平台",
        //                 isMenu:true
        //             }
        //         },
        //     ]
        // }
    ])("management-")
}
